<?php
/**
 * Hook基类
 */
declare(strict_types=1);

namespace Libraries\Bases;

use Libraries\Dispatcher;

abstract class HookBase
{
    protected $objCtrl = null;
    
    /**
     * 构造函数，可以重载
     * @param ControllerBase $objCtrl
     */
    public function __construct(ControllerBase $objCtrl)
    {
        $this->objCtrl = $objCtrl;
    }

    /**
     * 抽象函数，需要重载
     *
     * @param string $strCtrlAction
     * @param string $strHookType
     * @param array $arrParam
     */
    abstract public function run(
        string $strCtrlAction = '',
        string $strHookType = Dispatcher::HOOK_BEFORE,
        array $arrParam = []
    ): void;
}
